package top.xphu.zip.entiy;


/**
 * @author xphu
 * @version 1.0
 * @date 2021/7/1 16:43
 */
public class HttpClientConfig {
    /**
     * 连接超时
     */
    private Integer connectTimeout;
    /**
     * 通话超时
     */
    private Integer callTimeout;
    /**
     * 写超时
     */
    private Integer writeTimeout;
    /**
     * 读取超时
     */
    private Integer readTimeout;

    public HttpClientConfig build(){
        return new HttpClientConfig();
    }

    public HttpClientConfig connectTimeout(int connectTimeout){
        this.connectTimeout = connectTimeout;
        return this;
    }

    public HttpClientConfig callTimeout(int callTimeout){
        this.callTimeout = callTimeout;
        return this;
    }

    public HttpClientConfig writeTimeout(int writeTimeout){
        this.writeTimeout = writeTimeout;
        return this;
    }

    public HttpClientConfig readTimeout(int readTimeout){
        this.readTimeout = readTimeout;
        return this;
    }

    public Integer getConnectTimeout() {
        return connectTimeout;
    }

    public Integer getCallTimeout() {
        return callTimeout;
    }

    public Integer getWriteTimeout() {
        return writeTimeout;
    }

    public Integer getReadTimeout() {
        return readTimeout;
    }
}
